package com.dragon.modules.yuegou.query.system;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.system.UserBusdRefEntity;
import com.dragon.modules.yuegou.enums.system.UserBusdRefType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 用户商圈权限 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-09-13 15:43:58
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class UserBusdRefQuery extends UserBusdRefEntity implements Query<UserBusdRefEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 用户id查询条件 */
	@JsonUnwrapped(prefix = "userId")
	private Condition<String> userIdCondition;

    /** 商圈id查询条件 */
	@JsonUnwrapped(prefix = "busdId")
	private Condition<String> busdIdCondition;

    /** [枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件 */
	@JsonUnwrapped(prefix = "type")
	private Condition<UserBusdRefType> typeCondition;

    /** 删除标志查询条件 */
	@JsonUnwrapped(prefix = "del")
	private Condition<Boolean> delCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public UserBusdRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public UserBusdRefQuery(UserBusdRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public UserBusdRefQuery(UserBusdRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.userIdCondition != null) {
			this.userIdCondition = other.userIdCondition.copy();
		}
		if(other.busdIdCondition != null) {
			this.busdIdCondition = other.busdIdCondition.copy();
		}
		if(other.typeCondition != null) {
			this.typeCondition = other.typeCondition.copy();
		}
		if(other.delCondition != null) {
			this.delCondition = other.delCondition.copy();
		}
	}

	@Override
	public QueryWrapper<UserBusdRefEntity> toQueryWrapper() {
		QueryWrapper<UserBusdRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (userIdCondition != null) {
			userIdCondition.toWrapper(wrapper, COL_USER_ID);
		}
		if (busdIdCondition != null) {
			busdIdCondition.toWrapper(wrapper, COL_BUSD_ID);
		}
		if (typeCondition != null) {
			typeCondition.toWrapper(wrapper, COL_TYPE);
		}
		if (delCondition != null) {
			delCondition.toWrapper(wrapper, COL_DEL);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回用户id查询条件
	 * 
	 * @return userIdCondition 用户id查询条件
	 */
	public Condition<String> userId() {
		this.userIdCondition = new Condition<>();
		return this.userIdCondition;
	}
	
	/**
	 * 获取用户id查询条件
	 * 
	 * @return userIdCondition 用户id查询条件
	 */
	public Condition<String> getUserIdCondition() {
		return userIdCondition;
	}

	/**
	 * 设置用户id查询条件
	 * 
	 * @param userIdCondition 用户id查询条件
	 */
	public void setUserIdCondition(Condition<String> userIdCondition) {
		this.userIdCondition = userIdCondition;
	}

	/**
	 * 构造并返回商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> busdId() {
		this.busdIdCondition = new Condition<>();
		return this.busdIdCondition;
	}
	
	/**
	 * 获取商圈id查询条件
	 * 
	 * @return busdIdCondition 商圈id查询条件
	 */
	public Condition<String> getBusdIdCondition() {
		return busdIdCondition;
	}

	/**
	 * 设置商圈id查询条件
	 * 
	 * @param busdIdCondition 商圈id查询条件
	 */
	public void setBusdIdCondition(Condition<String> busdIdCondition) {
		this.busdIdCondition = busdIdCondition;
	}

	/**
	 * 构造并返回[枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 * 
	 * @return typeCondition [枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 */
	public Condition<UserBusdRefType> type() {
		this.typeCondition = new Condition<>();
		return this.typeCondition;
	}
	
	/**
	 * 获取[枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 * 
	 * @return typeCondition [枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 */
	public Condition<UserBusdRefType> getTypeCondition() {
		return typeCondition;
	}

	/**
	 * 设置[枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 * 
	 * @param typeCondition [枚举]类型：0-平台-PLATFORM、1-集团-GROUP查询条件
	 */
	public void setTypeCondition(Condition<UserBusdRefType> typeCondition) {
		this.typeCondition = typeCondition;
	}

	/**
	 * 构造并返回删除标志查询条件
	 * 
	 * @return delCondition 删除标志查询条件
	 */
	public Condition<Boolean> del() {
		this.delCondition = new Condition<>();
		return this.delCondition;
	}
	
	/**
	 * 获取删除标志查询条件
	 * 
	 * @return delCondition 删除标志查询条件
	 */
	public Condition<Boolean> getDelCondition() {
		return delCondition;
	}

	/**
	 * 设置删除标志查询条件
	 * 
	 * @param delCondition 删除标志查询条件
	 */
	public void setDelCondition(Condition<Boolean> delCondition) {
		this.delCondition = delCondition;
	}

}
